<?php
/**
 * jishupu-cms
 * @Author:技术铺<jishupu@qq.com>
 * @Date: 2021/11/22
 */

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

/**
 * 图集模块模型
 * Class InfoPicture
 * @package App\Models
 */
class InfoPicture extends Model
{
    use HasFactory;

    /**
     * 指定表名
     */
    protected $table = 'info_picture';

    /**
     * 指定主键
     * @var string
     */
    protected $primaryKey = 'info_id';

    /**
     * 关闭自动更新时间
     * @var bool
     */
    public $timestamps = FALSE;

    /**
     * 能批量赋值的属性
     *
     * @var string[]
     */
//    protected $fillable = [];

    /**
     * 不能被批量赋值的属性
     *
     * @var array
     */
    protected $guarded = [];

    /**
     * 数据显示时，设置了敏感信息字段数据中不显示
     *
     * @var array
     */
    protected $hidden = [
    ];

    /**
     * 显示数据时类型转换
     *
     * @var array
     */
    protected $casts = [
    ];

    /**
     * 关联信息主表
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function info()
    {
        return $this->belongsTo(Info::class);
    }

}
